package com.ourteam.product.model.domain;

import net.dao.IDataPopulateCallback;

import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

import java.util.HashMap;

/**
 * Template Name : DTO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Tue Nov 07 10:29:34 IRKT 2017
 * Auto Generate Date : 2017-11-15 14:51:32
  * Warning ! This file will be overwrite when regenerate !
  *
 */
import java.util.Map;


public class ProductModelObjectBean implements java.io.Serializable {
    private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

    static {
        mappedDaoFields.put("id",
            com.ourteam.product.model.dao.IProductModelObjectDAO.Id);

        mappedDaoFields.put("packageId",
            com.ourteam.product.model.dao.IProductModelObjectDAO.PackageId);

        mappedDaoFields.put("objectCode",
            com.ourteam.product.model.dao.IProductModelObjectDAO.ObjectCode);

        mappedDaoFields.put("objectName",
            com.ourteam.product.model.dao.IProductModelObjectDAO.ObjectName);

        mappedDaoFields.put("objectType",
            com.ourteam.product.model.dao.IProductModelObjectDAO.ObjectType);

        mappedDaoFields.put("isGenerate",
            com.ourteam.product.model.dao.IProductModelObjectDAO.IsGenerate);

        mappedDaoFields.put("status",
            com.ourteam.product.model.dao.IProductModelObjectDAO.Status);

        mappedDaoFields.put("remarks",
            com.ourteam.product.model.dao.IProductModelObjectDAO.Remarks);

        mappedDaoFields.put("packageName",
            com.ourteam.product.model.dao.IProductModelObjectDAO.PackageName);

        mappedDaoFields.put("domainCode",
            com.ourteam.product.model.dao.IProductModelObjectDAO.DomainCode);

        mappedDaoFields.put("domainName",
            com.ourteam.product.model.dao.IProductModelObjectDAO.DomainName);

        mappedDaoFields.put("domainId",
            com.ourteam.product.model.dao.IProductModelObjectDAO.DomainId);

        mappedDaoFields.put("submitterId",
            com.ourteam.product.model.dao.IProductModelObjectDAO.SubmitterId);

        mappedDaoFields.put("creatorName",
            com.ourteam.product.model.dao.IProductModelObjectDAO.CreatorName);

        mappedDaoFields.put("createTime",
            com.ourteam.product.model.dao.IProductModelObjectDAO.CreateTime);

        mappedDaoFields.put("lastModifierName",
            com.ourteam.product.model.dao.IProductModelObjectDAO.LastModifierName);

        mappedDaoFields.put("lastModifyTime",
            com.ourteam.product.model.dao.IProductModelObjectDAO.LastModifyTime);
    }

    private com.ourteam.product.model.dao.ProductModelObject productModelObject;

    public ProductModelObjectBean() {
        super();

        this.productModelObject = new com.ourteam.product.model.dao.ProductModelObject();
    }

    public ProductModelObjectBean(
        com.ourteam.product.model.dao.ProductModelObject productModelObject) {
        super();

        this.productModelObject = productModelObject;
    }

    protected BeanMap getBeanMap() {
        return new BeanMap(productModelObject);
    }

    public static String getMappedDAOField(String aAttrName) {
        return mappedDaoFields.get(aAttrName);
    }

    public com.ourteam.product.model.dao.ProductModelObject convertToProductModelObject() {
        return this.productModelObject;
    }

    public com.ourteam.product.model.dao.ProductModelObject convertTo() {
        return this.productModelObject;
    }

    /**
     * Get id
     *
     * @return long
     */
    public long getId() {
        return (long) this.productModelObject.getId();
    }

    /**
     * Set id
     *
     * @parameter long
     */
    public void setId(long id) {
        this.productModelObject.setId(id);
    }

    /**
     * Get packageId
     *
     * @return long
     */
    public long getPackageId() {
        return (long) this.productModelObject.getPackageId();
    }

    /**
     * Set packageId
     *
     * @parameter long
     */
    public void setPackageId(long packageId) {
        this.productModelObject.setPackageId(packageId);
    }

    /**
     * Get objectCode
     *
     * @return String
     */
    public String getObjectCode() {
        return (String) this.productModelObject.getObjectCode();
    }

    /**
     * Set objectCode
     *
     * @parameter String
     */
    public void setObjectCode(String objectCode) {
        this.productModelObject.setObjectCode(objectCode);
    }

    /**
     * Get objectName
     *
     * @return String
     */
    public String getObjectName() {
        return (String) this.productModelObject.getObjectName();
    }

    /**
     * Set objectName
     *
     * @parameter String
     */
    public void setObjectName(String objectName) {
        this.productModelObject.setObjectName(objectName);
    }

    /**
     * Get objectType
     *
     * @return String
     */
    public String getObjectType() {
        return (String) this.productModelObject.getObjectType();
    }

    /**
     * Set objectType
     *
     * @parameter String
     */
    public void setObjectType(String objectType) {
        this.productModelObject.setObjectType(objectType);
    }

    /**
     * Get isGenerate
     *
     * @return String
     */
    public String getIsGenerate() {
        return (String) this.productModelObject.getIsGenerate();
    }

    /**
     * Set isGenerate
     *
     * @parameter String
     */
    public void setIsGenerate(String isGenerate) {
        this.productModelObject.setIsGenerate(isGenerate);
    }

    /**
     * Get status
     *
     * @return String
     */
    public String getStatus() {
        return (String) this.productModelObject.getStatus();
    }

    /**
     * Set status
     *
     * @parameter String
     */
    public void setStatus(String status) {
        this.productModelObject.setStatus(status);
    }

    /**
     * Get remarks
     *
     * @return String
     */
    public String getRemarks() {
        return (String) this.productModelObject.getRemarks();
    }

    /**
     * Set remarks
     *
     * @parameter String
     */
    public void setRemarks(String remarks) {
        this.productModelObject.setRemarks(remarks);
    }

    /**
     * Get packageName
     *
     * @return String
     */
    public String getPackageName() {
        return (String) this.productModelObject.getPackageName();
    }

    /**
     * Get domainCode
     *
     * @return String
     */
    public String getDomainCode() {
        return (String) this.productModelObject.getDomainCode();
    }

    /**
     * Get domainName
     *
     * @return String
     */
    public String getDomainName() {
        return (String) this.productModelObject.getDomainName();
    }

    /**
     * Get domainId
     *
     * @return long
     */
    public long getDomainId() {
        return (long) this.productModelObject.getDomainId();
    }

    /**
     * Get submitterId
     *
     * @return long
     */
    public long getSubmitterId() {
        return (long) this.productModelObject.getSubmitterId();
    }

    /**
     * Set submitterId
     *
     * @parameter long
     */
    public void setSubmitterId(long submitterId) {
        this.productModelObject.setSubmitterId(submitterId);
    }

    /**
     * Get creatorName
     *
     * @return String
     */
    public String getCreatorName() {
        return (String) this.productModelObject.getCreatorName();
    }

    /**
     * Set creatorName
     *
     * @parameter String
     */
    public void setCreatorName(String creatorName) {
        this.productModelObject.setCreatorName(creatorName);
    }

    /**
     * Get createTime
     *
     * @return java.util.Date
     */
    public java.util.Date getCreateTime() {
        return (java.util.Date) this.productModelObject.getCreateTime();
    }

    /**
     * Set createTime
     *
     * @parameter java.util.Date
     */
    public void setCreateTime(java.util.Date createTime) {
        this.productModelObject.setCreateTime(createTime);
    }

    /**
     * Get lastModifierName
     *
     * @return String
     */
    public String getLastModifierName() {
        return (String) this.productModelObject.getLastModifierName();
    }

    /**
     * Set lastModifierName
     *
     * @parameter String
     */
    public void setLastModifierName(String lastModifierName) {
        this.productModelObject.setLastModifierName(lastModifierName);
    }

    /**
     * Get lastModifyTime
     *
     * @return java.util.Date
     */
    public java.util.Date getLastModifyTime() {
        return (java.util.Date) this.productModelObject.getLastModifyTime();
    }

    /**
     * Set lastModifyTime
     *
     * @parameter java.util.Date
     */
    public void setLastModifyTime(java.util.Date lastModifyTime) {
        this.productModelObject.setLastModifyTime(lastModifyTime);
    }

    public int hashCode() {
        return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
    }

    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        } // end if

        if ((obj instanceof ProductModelObjectBean) == false) {
            return false;
        } // end if

        ProductModelObjectBean other = (ProductModelObjectBean) obj;

        boolean isEqual = false;

        com.ourteam.product.model.dao.ProductModelObject tempProductModelObject = other.convertToProductModelObject();

        if ((tempProductModelObject == null) ||
                (this.productModelObject == null)) {
            isEqual = false;
        } else if ((tempProductModelObject == this.productModelObject) ||
                tempProductModelObject.equals(this.productModelObject)) {
            isEqual = true;
        } else {
            isEqual = false;
        }

        return isEqual;
    }

    public static ProductModelObjectBean[] toArray(
        com.ourteam.product.model.dao.ProductModelObject[] aProductModelObjects) {
        return toArray(aProductModelObjects, null);
    }

    public static ProductModelObjectBean[] toArray(
        com.ourteam.product.model.dao.ProductModelObject[] aProductModelObjects,
        IDataPopulateCallback aCallBack) {
        if (ArrayUtils.isEmpty(aProductModelObjects)) {
            return new ProductModelObjectBean[0];
        }

        int length = aProductModelObjects.length;

        ProductModelObjectBean[] beans = new ProductModelObjectBean[length];

        for (int i = 0; i < length; i++) {
            beans[i] = new ProductModelObjectBean(aProductModelObjects[i]);

            if (aCallBack != null) {
                aCallBack.populate(beans[i],
                    new Object[] { aProductModelObjects[i] });
            }
        }

        return beans;
    }
}
